PreferencesWindow

A window to present an application's preferences.

<picture> <source srcset="preferences-window-dark.png" media="(prefers-color-scheme: dark)"> <img src="preferences-window.png" alt="preferences-window"> </picture>

The AdwPreferencesWindow widget presents an application's preferences gathered into pages and groups. The preferences are searchable by the user.

CSS nodes

AdwPreferencesWindow has a main CSS node with the name window and the style class .preferences.

Constructors

this
this(AdwPreferencesWindow* adwPreferencesWindow, bool ownedRef)

Sets our main struct and passes it to the parent class.

this
this()

Creates a new AdwPreferencesWindow.

Members

Functions

add
void add(PreferencesPage page)

Adds a preferences page to @self.

addToast
void addToast(Toast toast)

Displays @toast.

closeSubpage
void closeSubpage()

Closes the current subpage.

getCanNavigateBack
bool getCanNavigateBack()

Gets whether gestures and shortcuts for closing subpages are enabled.

getPreferencesWindowStruct
AdwPreferencesWindow* getPreferencesWindowStruct(bool transferOwnership)

Get the main Gtk struct

getSearchEnabled
bool getSearchEnabled()

Gets whether search is enabled for @self.

getStruct
void* getStruct()

the main Gtk struct as a void*

getVisiblePage
PreferencesPage getVisiblePage()

Gets the currently visible page of @self.

getVisiblePageName
string getVisiblePageName()

Gets the name of currently visible page of @self.

presentSubpage
void presentSubpage(Widget subpage)

Sets @subpage as the window's subpage and opens it.

remove
void remove(PreferencesPage page)

Removes a page from @self.

setCanNavigateBack
void setCanNavigateBack(bool canNavigateBack)

Sets whether gestures and shortcuts for closing subpages are enabled.

setSearchEnabled
void setSearchEnabled(bool searchEnabled)

Sets whether search is enabled for @self.

setVisiblePage
void setVisiblePage(PreferencesPage page)

Makes @page the visible page of @self.

setVisiblePageName
void setVisiblePageName(string name)

Makes the page with the given name visible.

Static functions

getType
GType getType()

Variables

adwPreferencesWindow
AdwPreferencesWindow* adwPreferencesWindow;

the main Gtk struct

Inherited Members

From Window

adwWindow
AdwWindow* adwWindow;

the main Gtk struct

getAdwWindowStruct
AdwWindow* getAdwWindowStruct(bool transferOwnership)

Get the main Gtk struct

getStruct
void* getStruct()

the main Gtk struct as a void*

setChild
void setChild(Widget child)

You should use setContent(Widget) instead

getType
GType getType()
getContent
Widget getContent()

Gets the content widget of @self.

setContent
void setContent(Widget content)

Sets the content widget of @self.

Meta